package generic;

import java.util.Date;

import org.junit.Test;

public class DateTest {

    @Test
    public void getDate() {
        // 5673d011 1e41eb 6f24 ce7e12
        long tick = 0x5673d011;
        Date date = new Date(tick*1000);
        System.out.println("date = " + date);
        
        System.out.println("tick = " + Long.toHexString(date.getTime()/1000));
    }
    
    @Test
    public void fromDate() {

        long tick = System.currentTimeMillis();
        System.out.println("date = " + Long.toHexString(tick/1000));
        Date date = new Date(tick);
        System.out.println("date = " + date);
        
    }
    
    @Test
    public void fromLong() {
        long  value = 1455764020896l;
        Date date = new Date(value);
        System.out.println("date = " + date);
    }
}
